From: Jasper St. Pierre Date: Thu, 16 Aug 2012 17:40:20 +0000 (-0400) Subject: grabHelper: Clean up X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~6134 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=79c25d1dc8742b821c350a0c2133d713432c2e32;p=gnome-shell.git grabHelper: Clean up Remove a dummy "return;", and remove an unused parameter. --- diff --git a/js/ui/grabHelper.js b/js/ui/grabHelper.js index cdc92c411..6cb10073f 100644 --- a/js/ui/grabHelper.js +++ b/js/ui/grabHelper.js @@ -140,7 +140,7 @@ const GrabHelper = new Lang.Class({ let focus = global.stage.key_focus; let hadFocus = focus && this._isWithinGrabbedActor(focus); - let newFocus = hadFocus ? focus : params.actor; + let newFocus = hadFocus : focus ? params.actor; if (this.isActorGrabbed(params.actor)) return; @@ -156,8 +156,6 @@ const GrabHelper = new Lang.Class({ this._modalCount++; _navigateActor(newFocus, hadFocus); - - return; }, _fullGrab: function(hadFocus, modal, grabFocus) { @@ -232,15 +230,14 @@ const GrabHelper = new Lang.Class({ // If we took away the last grab, ungrab ourselves. if (this._grabStack.length == 0) - this._fullUngrab(newFocus); + this._fullUngrab(); if (modal) this._modalCount--; - return; }, - _fullUngrab: function(newFocus) { + _fullUngrab: function() { global.stage.disconnect(this._capturedEventId); this._capturedEventId = 0; global.stage.disconnect(this._eventId);